﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraSplashScreen;
using Sumen.Business.Model.Presenter.Sys;

namespace Sumen_Stock.LookAndFeel.Sumen_System
{
    public partial class Frm_History_System : DevExpress.XtraEditors.XtraForm
    {
        private SysLogPresenter _logPresenter;
        public Frm_History_System()
        {
            InitializeComponent();
            dateBegin.DateTime = DateTime.Today;
            dateEnd.DateTime = dateBegin.DateTime.AddDays(1).AddMinutes(-1);
            _logPresenter = new SysLogPresenter();
        }

        public override void Refresh()
        {
            base.Refresh();
            LoadForm();
        }



        void LoadForm()
        {
            SplashScreenManager.ShowForm(typeof(WaitForm1));
            gridControl1.DataSource = _logPresenter.GetLog(dateBegin.DateTime, dateEnd.DateTime).First();
            SplashScreenManager.CloseForm();
        }

        private void btnView_Click(object sender, EventArgs e)
        {
            LoadForm();
        }

        private void btnExcel_Click(object sender, EventArgs e)
        {

        }

        private void btnLoadFromFile_Click(object sender, EventArgs e)
        {

        }


    }
}